<%@ page language="java" contentType="text/html" pageEncoding="utf-8"%>
<%@include file="/WEB-INF/pages/common/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <%@include file="/WEB-INF/pages/common/head.jsp"%>
    <%@include file="/resources/datepicker/datepicker.jsp"%>
    <title><spring:message code="title.dictionary"/></title>
    <script type="text/javascript">
        var datagrid;
        var message =$.messager;
        var operateDialog;
        $(function() {
            datagrid=$('#datagrid').datagrid({
                url : '${path}/business/supplier_quality/delivery_quality/ajaxList.do',
                queryParams: imonJYRH.serializeObject($("#tableForm *")),
                onLoadSuccess:function(){
                   
                }
            });
        });
        //子页面返回方法
        function returnResult(){
            operateDialog.dialog('close');
            datagrid.datagrid('unselectAll');
            datagrid.datagrid('reload');
        }
     
        function search_() {
            datagrid.datagrid('unselectAll');
            datagrid.datagrid('load', imonJYRH.serializeObject($("#tableForm *")));
        }
        function reset_(){
            $("#tableForm *").each(function(){
                $(":input:not(:checkbox,:radio)",this).val("");
            });
        }
          
      function dialogSupplier_(){
            var href = '${path}/basedata/supplier/dialogUI.do';
            operateDialog = $("#operateDialog").dialog({
                title : '<spring:message code='msg.dialog.choose'/>',
                width : 650,
                height : 400
            });
            $("#operateIFrame")[0].src=href;
            operateDialog.dialog('open');
        }
     function dialogSupplierReturn(row){
            $("#supplierId").val(row['id']);
            $("#supplierCode").val(row['code']);
            $("#supplierName").val(row['name']);
            operateDialog.dialog('close');
        }
    </script>
</head>
  
  <body class="easyui-layout">
<div data-options="region:'north'" style="overflow: hidden;">
    <div class="datagrid-toolbar" style="height:auto;">
        <br/>
        <fieldset>
            <table width="100%" id="tableForm">
                <tr>
                    <td align="right">SupplierCode供应商编码：</td>
                    <td>
                        <input type="hidden" id='supplierId' name="supplierId"/>
                        <input type="text" id="supplierCode" onclick="dialogSupplier_();" readonly="true"/>
                    </td>
                    <td align="right">SupplierName供应商名称：</td>
                    <td>
                         <input type="text" id="supplierName"  disabled/>
                    </td>
                    <td align="right">Year年份：</td>
                    <td>
                       <input type="text" name="year" value="${year}" id="year"
                               onFocus="WdatePicker({isShowClear:false,isShowToday:false,dateFmt:'yyyy',readOnly:true})" class="field Wdate"/>
                    </td>
                </tr>
            </table>
        </fieldset>
        <br/>
    </div>
</div>
<div data-options="region:'center'">
    <div id="tb">
          <a class="easyui-linkbutton" href="javascript:void(0);" plain="true" iconCls="icon-search" onclick="search_();"><spring:message code="bar.command.search"/></a>
<!--        <a class="easyui-linkbutton" href="javascript:void(0);" plain="true" iconCls="icon-undo" onclick="reset_();"><spring:message code="bar.command.reset"/></a>
-->    </div>
    <table id="datagrid" toolbar="#tb" pagination="true" fit="true" nowrap="false" singleSelect="true">
        <thead>
        <tr>
            <th field="ck" checkbox="true" rowspan="2"></th>
            <th field="supplierCode" width="100" align="center" rowspan="2">supplierCode<br/>供应商编码</th>
            <th field="supplierName" width="200" align="center" rowspan="2">SupplierName<br/>供应商名称</th>
            <th field="year" width="80" align="center" rowspan="2">Year<br/>年份</th>
            <th field="ipiCTarget" width="80" align="center" rowspan="2">IPICTarget</th>
            <th colspan="12">0-Miles Delivery Quality0公里交付质量</th>
        </tr>
        <tr>
            <th field="january" width="120" align="center">January<br/>一月</th>
            <th field="february" width="120" align="center">February<br/>二月</th>
            <th field="march" width="120" align="center">March<br/>三月</th>
            <th field="april" width="120" align="center">April<br/>四月</th>
            <th field="may" width="120" align="center">May<br/>五月</th>
            <th field="june" width="120" align="center">June<br/>六月</th>
            <th field="july" width="120" align="center">July<br/>七月</th>
            <th field="august" width="120" align="center">August<br/>八月</th>
            <th field="september" width="120" align="center">September<br/>九月</th>
            <th field="october" width="120" align="center">October<br/>十月</th>
            <th field="november" width="120" align="center">November<br/>十一月</th>
            <th field="december" width="120" align="center">December<br/>十二月</th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>
<div id="operateDialog" class="easyui-dialog"
     data-options="iconCls:'icon-save',resizable:true,modal:true,closed: true,collapsible:true,maximizable:true">
    <iframe scrolling="auto" id='operateIFrame' frameborder="0"  src="" style="width:100%;height:100%;"/>
</div>
</body>
  
</html>